import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    meta: {
      isShowTab: false,
      isShowNav: true,
    }
  },
  // {
  //   path: '/bargain',
  //   name: 'About',
  //   component: () => import('../views/About.vue')
  // },
  {
    path: '/personage',
    name: 'personage',
    component: () => import('../views/personage.vue'),
    meta: {
      isShowTab: false,
      isShowNav: true,
    }
  },
  {
    path: '/bargainlist',
    name: 'bargainlist',
    component: () => import('../components/bargain/bargainlist.vue'),
    meta: {
      isShowTab: true,
      isShowNav: false,
      title: "砍价列表"
    }
  },
  {
    path: '/strictdetail',
    name: 'strictdetail',
    component: () => import('../components/detail/strictDetail.vue'),
    meta: {
      isShowTab: true,
      isShowNav: false,
      title: "严选专栏"
    }
  },
  {
    path: '/specialdetail',
    name: 'specialdetail',
    component: () => import('../components/detail/specialDetail.vue'),
    meta: {
      isShowTab: true,
      isShowNav: false,
      title: "专栏详情"
    }
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/login.vue'),
    meta: {
      isShowTab: false,
      isShowNav: false,
    }
  },
  {
    path: '/join',
    name: 'join',
    component: () => import('../views/join.vue'),
    meta: {
      isShowTab: false,
      isShowNav: false,
    }
  },
  {
    path: '/shoplists',
    name: 'shoplists',
    component: () => import('../components/shoplist/shoplists.vue'),
    meta: {
      isShowTab: true,
      isShowNav: false,
      title: "人气推荐"
    }
  },
  {
    path: '/shopdetail',
    name: 'shopdetail',
    component: () => import('../components/shoplist/shopdetail.vue'),
    meta: {
      isShowTab: false,
      isShowNav: false,
    }
  },
  {
    path: '/classify',
    name: 'classify',
    component: () => import('../views/classify.vue'),
    meta: {
      isShowTab: false,
      isShowNav: true,
    }
  },
  {
    path: '/classifyshop',
    name: 'classifyshop',
    component: () => import('../components/classify/classifyshop.vue'),
    meta: {
      isShowTab: true,
      isShowNav: false,
      title: "分类商品"
    }
  },
  {
    path: '/cart',
    name: 'cart',
    component: () => import('../views/cart.vue'),
    meta: {
      isShowTab: true,
      isShowNav: true,
      title: "购物车"
    }
  },
  {
    path: '/myorder',
    name: 'myorder',
    component: () => import('../views/myorder.vue'),
    meta: {
      isShowTab: true,
      isShowNav: false,
      title: "我的订单"
    }
  },
  {
    path: '/myaddress',
    name: 'myaddress',
    component: () => import('../components/staymoney/myaddress.vue'),
    meta: {
      isShowTab: true,
      isShowNav: false,
      title: "我的地址"
    }
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
